package com.tbit.main.service.impl;

import com.tbit.main.constant.DaoParamConstant;
import com.tbit.main.dao.core.LessIntelligentSiteDao;
import com.tbit.main.pojo.LessIntelligentSite;
import com.tbit.main.service.LessIntelligentSiteService;
import com.tbit.main.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author LMY
 * @create 2021-08-31 15:13
 * 冷门站点
 */
@Service("lessIntelligentSiteService")
public class LessIntelligentSiteServiceImpl implements LessIntelligentSiteService {

    @Autowired
    private LessIntelligentSiteDao lessIntelligentSiteDao;

    @Override
    public List<LessIntelligentSite> getByAccountId(Integer accountId, List<Integer> regionId) {
        Map<String, Object> params = new HashMap<>();
        params.put("regionId", StringUtil.getListString(regionId));
        params.put(DaoParamConstant.accountId, accountId);
        return lessIntelligentSiteDao.getByAccountId(params);
    }
}
